#include <iostream>

int main(int argc, char const *argv[])
{
    // int a = 10;
    // int &b = a;

    // std::cout << "a = " << a << std::endl; // 10
    // std::cout << "&b = " << &b << std::endl; // 0x7fffffffe01c
    // std::cout << "b = " << b << std::endl; // 10

    // b = 100;

    // std::cout << "a = " << a << std::endl; // 100
    // std::cout << "&b = " << &b << std::endl; // 0x7fffffffe01c
    // std::cout << "b = " << b << std::endl; // 100

    int a = 10;
    int *b = &a;

    std::cout << "a = " << a << std::endl; // 10
    std::cout << "&b = " << &b << std::endl; // 0x7fffffffe020
    std::cout << "*b = " << *b << std::endl; // 10
    std::cout << "b = " << b << std::endl; // 0x7fffffffe01c

    *b = 100;

    std::cout << "a = " << a << std::endl; // 100
    std::cout << "&b = " << &b << std::endl; // 0x7fffffffe020
    std::cout << "*b = " << *b << std::endl; // 100 
    std::cout << "b = " << b << std::endl; // 0x7fffffffe01c

    return 0;
}
